package com.huangliusong.desigin.pattern.creational.singleton;

/**
 * @author huangliusong
 * @since 2018/10/11
 * {@link }
 */
public class ThreadLocalInstanceTest {
    public static void main(String[] args) {
        System.err.println("主线程"+ThreadLocalInstance.getInstance());
        System.err.println("主线程"+ThreadLocalInstance.getInstance());
        System.err.println("主线程"+ThreadLocalInstance.getInstance());
        System.err.println("主线程"+ThreadLocalInstance.getInstance());
        System.err.println("主线程"+ThreadLocalInstance.getInstance());


        Thread thread=new Thread(new T());
        Thread thread1=new Thread(new T());
        thread.start();;
        thread1.start();
    }
}
